REVIEW a) import java.util.Scanner; public class Initials { public static void main(String [] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter your name: "); String first = sc.next(); String last = sc.next(); String initials = first.charAt(0)+"."+last.charAt(0)+"."; System.out.println("Initials: " + initials); } } b) 1. Answer: 32 2. Answer: e 3. Answer: hannah.charAt(15) c) public class Decode { public static void main(String [] args) { String s = "Iqqf\"Lqd#\"[qw\"hkiwtgf\"kv\"qwv#"; String message=""; for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); //get current char c -= 2; //shift down by 2 message += c; //append to String } System.out.println(message); //Good Job! You figured it out! } } d) a. Answer: AB-1X b. Answer: Denver c. Answer: false e) int count = 0; if(Character.isUpperCase(sentence.charAt(0))) { //if the first letter is upper case count++;//count it! } int space = sentence.indexOf(" ");//finds the index of the first space while (space != -1) {//as long as there are spaces in the sentence if(Character.isUpperCase(sentence.charAt(space + 1))) { //if the first letter of the next word (after the space) is upper case count++;//count it too! } space = sentence.indexOf(" ", space + 1);//continue updating the value for loc based on the next location of a space } System.out.println("There are " + count + " words that start with an uppercase letter."); f) import java.util.Scanner; public class CountVowels { public static void main(String [] args) { Scanner sc = new Scanner (System.in); System.out.print("Enter a String: "); String s = sc.nextLine(); int countVowels = 0; for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); if(c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') { countVowels++; } } System.out.println("Number of vowels: " + countVowels); } }